1. Field of the Invention
The present invention relates to a focus detecting device having a plurality of focus areas within an image plane or an apparatus having the focus detecting device.
2. Description of Related Art
Some of known focus detecting devices are arranged to split the exit pupil of a photo-taking lens by an optical system of a focus detecting system, to receive two object images formed by light fluxes passing through the split pupil areas on an array of photoelectric conversion elements, such as a CCD sensor array, to detect the focusing state of the photo-taking lens from the output of the photoelectric conversion element array, and to drive the photo-taking lens on the basis of the result of detection.
The basic concept of focus detection which has been known as shown in FIG. 12 is briefly described below.
Referring to FIG. 12, a field lens 83 is set on the optical axis of a photo-taking lens 81 the focus of which is to be detected. Two secondary image forming lenses 84a and 84b are disposed in rear of the field lens 83 at positions symmetrical with respect to the optical axis. Photoelectric conversion element arrays 85a and 85b are disposed further in rear of the secondary image forming lenses 84a and 84b. Diaphragms 86a and 86b are set respectively in the neighborhood of the secondary image forming lenses 84a and 84b. The field lens 83 is arranged to approximately image the exit pupil of the photo-taking lens 81 on the pupil planes of the two secondary image forming lenses 84a and 84b. As a result, light fluxes incident respectively on the secondary image forming lenses 84a and 84b come to make their exits from areas of equal sizes which correspond respectively to the secondary image forming lenses 84a and 84b on the exit pupil plane of the photo-taking lens 81 and never overlap each other.
Space images formed in the neighborhood of the field lens 83 are reimaged by the secondary image forming lenses 84a and 84b on the surfaces of the photoelectric conversion element arrays 85a and 85b. The two images on the photoelectric conversion element arrays 85a and 85b change their positions according to changes of image position in the air in the direction of the optical axis. Therefore, the focusing state of the photo-taking lens 81 can be found by detecting the amount of displacement (deviation) taking place in the relative positions of the two images on the photoelectric conversion element arrays 85a and 85b. 
A method for processing photoelectrically-converted image signals outputted from the photoelectric conversion element arrays 85a and 85b is well known. Therefore, the details of this method are omitted from the description given here. In brief, an arithmetic operation is performed on some correlative functions while electrically (virtually) shifting the image signals.
With the displacement of the relative positions obtained in this manner, the amount of focus deviation, i.e., the so-called amount of defocus, of the photo-taking lens is detected.
According to the above-stated defocus-amount detecting method, a pair of sensors are arranged to extract only the luminance distribution of a specific area of an object space. It is, therefore, impossible to compute the amount of defocus for any object that has no luminance distribution within that specific area.
To solve this problem, a method was disclosed in Japanese Patent Publication No. SHO 59-28886 and Japanese Laid-Open Patent Application No. SHO 62-212611. This method permits focus detection for a greater number of objects by arranging a plurality of sensor pairs and focus detecting optical systems corresponding thereto and by extracting luminance distributions obtained within a plurality of object areas.
In the case of this method, small areas for which focus is detectable are called focus-detection points. Then, a plurality of focus-detection points are arranged within a viewfinder field to correspond to many objects.
For example, the focus-detection points to be used for focus detection are arranged horizontally as indicated by reference numerals 600 to 604 in FIG. 13. As regards a method for finally obtaining an amount of defocus from a plurality of focus detecting mechanisms which correspond to these focus-detection points, a near-point priority algorithm in which weight is attached to a central focus-detection point is well known.
FIG. 14 is a flow chart showing an automatic focus-detection point selection algorithm in which weight is attached to a central focus-detection point. In the flow chart of FIG. 14, the focus-detection points are indicated as AF points. The automatic focus-detection point selection algorithm is carried out as follows.
At a step S501, a check is made for any focus-detection point in which focus is detectable (focus-detectable focus-detection point) among the five focus-detection points. If there is no focus-detectable focus-detection point, the flow of operation comes to an end and returns to a main routine which is not shown. If there is any focus-detectable focus-detection point, the flow proceeds from the step S501 to a step S502. At the step S502, a check is made to find if the number of focus-detectable focus-detection points is one. If so, the flow proceeds to a step S507. If not, the flow proceeds to a step S503. At the step S507, the one focus-detectable focus-detection point is selected for obtaining an amount of defocus.
At the step S503, with the number of focus-detectable focus-detection points found at the step S502 to be not one but two or more, a check is made to find if the focus-detectable focus-detection points include a central focus-detection point. If not, the flow directly proceeds to a step S505. If so, the flow proceeds to a step S504. At the step S504, a check is made to find if focus information obtained at the central focus-detection point indicates a near distance. If so, the flow proceeds to the step S505.
In other words, the flow of operation proceeds to the step S505 either if the central focus-detection point is a focus-detectable focus-detection point and indicates a near distance or if the central focus-detection point is not a focus-detectable focus-detection point. At the step S505, a check is made to find if the number of focus-detectable focus-detection points indicative of near distances is larger than the number of focus-detectable focus-detection points indicative of far distances. If so, the flow proceeds to a step S506 on the assumption that a main object of shooting is located at a near distance. If not, the flow proceeds to a step S510 on the assumption that the main object is located at a far distance. At the step S506, a focus-detectable focus-detection point indicative of the nearest distance is selected for obtaining an amount of defocus. At the step S510, taking the depth of field into consideration, a focus-detectable focus-detection point indicative of the nearest distance among focus-detectable focus-detection points indicative of far distances is selected for obtaining an amount of defocus.
Further, if the focus information obtained at the central focus-detection point at the step S504 indicates a far distance, the flow proceeds from the step S504 to a step S508. At the step S508, a check is made to find if the number of focus-detectable focus-detection points indicative of far distances is larger than the number of focus-detectable focus-detection points indicative of near distances. If so, the flow proceeds to a step S509, on the assumption that the main object of shooting is located at a far distance including the central focus-detection point, and the central focus-detection point is selected for obtaining an amount of defocus. If not, the flow proceeds to the step S506 to select the focus-detection point indicative of the nearest distance for obtaining an amount of defocus.
According to the prior art described above, if some of focus-detection points are found to permit focus detection, one of the focus-detectable focus-detection points is automatically selected as a focus-detection point to be used for obtaining an amount of defocus.
In accordance with one aspect of the invention, there is provided a focus detecting device for deciding at least one focus area from among a plurality of focus areas disposed within an image plane, the focus detecting device comprising selecting means for, on the basis of amounts of defocus detected respectively at the plurality of focus areas, dividing the plurality of focus areas into a plurality of groups and selecting a focus area capturing a target object from among the plurality of groups, weighting means for, on the basis of positions of the plurality of focus areas within the image plane, dividing the plurality of focus areas into a plurality of groups and respectively weighting the plurality of groups, and deciding means for deciding at least one focus area from among the plurality of focus areas by adding a result of weighting made by the weighting means to a result of selection made by the selecting means, the weighting means performing the grouping and the weighting differently according to a posture of an apparatus. Accordingly, it is possible to decide an optimum focus area from among the plurality of focus areas irrespective of the posture of the apparatus.
The above and other aspects and features of the invention will become apparent from the following detailed description of a preferred embodiment thereof taken in connection with the accompanying drawings.